package _2025_5_9;

public class StackOver {
    //记录方法被调用的次数
    private static int sum=0;
    //使用其无限递归
    public void start(){
        sum++;
        start();
    }

    public static void main(String[] args) {
       StackOver stackOver=new StackOver();

        try {
            stackOver.start();
        } catch (Throwable e) {
            System.out.println(sum);
            throw new RuntimeException(e);
        }
    }
}
